package cn.jiyun.address.service.impl;

import cn.jiyun.address.dao.AddressDao;
import cn.jiyun.address.pojo.Address;
import cn.jiyun.address.service.AddressService;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AddressServiceImpl implements AddressService {
    @Autowired
    private AddressDao addressDao;
    @Override
    public List<Address> findAddrList(Integer id) {
        LambdaQueryWrapper<Address> wrapper = new LambdaQueryWrapper<>();
        wrapper.eq(Address::getParentId,id);
        return addressDao.selectList(wrapper);
    }
}
